package HCI.src;


import android.app.Activity;
import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TabHost;
import android.widget.TextView;

public class Home extends Activity {
	Connector a;
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.home);
     /*   Button home = (Button)findViewById(R.id.home);
        home.setOnClickListener(new View.OnClickListener(){ 
	    	public void onClick(View view) {
				Intent switchToRegistration = new Intent(view.getContext(), Home.class);
				
				startActivity(switchToRegistration);
	    	}
	    }
	    	);
        Button browse = (Button)findViewById(R.id.browse);
        browse.setOnClickListener(new View.OnClickListener(){ 
	    	public void onClick(View view) {
				Intent switchToRegistration = new Intent(view.getContext(), Browse.class);
				
				startActivity(switchToRegistration);
	    	}
	    }
	    	);*/
        Button signOut = (Button)findViewById(R.id.signOutButton);
        signOut.setOnClickListener(new View.OnClickListener(){ 
	    	public void onClick(View view) {
				Intent switchToRegistration = new Intent(view.getContext(), HCI1Login.class);
				
				startActivity(switchToRegistration);
	    	}
	    }
	    	);
    //    EditText username = (EditText)findViewById(R.id.UsernameEditText);
       TextView t =  (TextView)findViewById(R.id.welcomeUser);
   //   String name =  username.getText().toString();
      // String text = "welcome "+((username.getText()).toString());
       
       t.setText("welcome "+HCI1Login.user);
    /*    Button search = (Button)findViewById(R.id.search);
        search.setOnClickListener(new View.OnClickListener(){ 
	    	public void onClick(View view) {
				Intent switchToRegistration = new Intent(view.getContext(), searching.class);
				
				startActivity(switchToRegistration);
	    	}
	    }
	    	);
     */
        
    }
}